home *** CD-ROM | disk | FTP | other *** search
- Path: news.cs.ucla.edu!twinsun!usenet
- From: Mike Klein <mklein@alumni.caltech.edu>
- Newsgroups: comp.lang.smalltalk,comp.lang.java,comp.lang.c++
- Subject: Re: Smalltalk slower than C++
- Date: Fri, 19 Apr 1996 15:20:25 -0700
- Organization: Codehenge
- Message-ID: <317811A9.7644@alumni.caltech.edu>
- References: <4kuavb$1dbc@watnews1.watson.ibm.com> <3174DD97.6BE1D26@bnr.ca> <3177048B.2CBD@alumni.caltech.edu> <gscottDq3Ipq.1rz@netcom.com>
- NNTP-Posting-Host: 192.54.239.42
- Mime-Version: 1.0
- Content-Type: text/plain; charset=us-ascii
- Content-Transfer-Encoding: 7bit
- X-Mailer: Mozilla 2.01 (X11; I; SunOS 5.5 sun4u)
-
- > Mike Klein (mklein@alumni.caltech.edu) wrote:
- > : Here's a simple sample task:
- > : Open a scrolling list interface on integers from one to ten million.
- >
- > : Smalltalk results:
- >
- > : Coding time: 20 sec. (Yes I actually timed it).
- > : Execution time: 64 millisecons (Sun Ultra-1, VW2.5)
- > : Source code:
- >
- > : SequenceView openOn: (1 to: 10000000).
- >
- > : I look forward to hearing *any* results from the Java/C++ world.
- >
- > Ok, I'll bite :-)
- >
- > Looks like you didn't save the SequenceView instance you created, so
- > after the user selects the number he wants (say by clicking on the
- > up scrollbar arrow an average of five million times) you won't be
- > able to do anything with the data since you can't get to it.
-
- That wasn't in the specification. I Admit I chose a simple example.
- The point is I actually coded something that actually ran.
- *Real* measurements, not vapor with stuff left over as an
- exercise. If you wish to specify, code, and test a different benchmark,
- go for it.
-
- > And I *hate* scrolling lists used for numeric input, so we'll just use
- > a nice simple labeled numeric input box and do it in Java:
- I wasn't intending it to be used as an example of a good UI.
-
- > NumericInputBox myInput = new NumericInputBox("Enter Number:", 1, 10000000);
- > add(myInput);
- >
- > So there. Nyeah.
- Great, now we know that you can type.
- It wasn't what was specified.
- Did it run?
-
- > Of course the implementation of NumericInputBox is
- > left as an exercise, but it's pretty trivial to do.
- Trivial, maybe. Done?
-
- > Watch Java have
- > a more complete class library in six months than Smalltalk has got
- > after 20 years.
- Meet you back here in October.
-
- > G.
- >
- > P.S. Smalltalk is still perhaps my favorite language, but Java has a
- > lot of things going for it that ST does not.
- Like what? I am really curious. The only thing that Java seems
- to me to have going for it is an awful lot of platforms out there
- that actually run it.
-
- -- Mike Klein
- mklein@alumni.caltech.edu
-